<?php
set_time_limit(0);
include __DIR__.'/function.php';
require __DIR__.'/vendor/autoload.php';

use QL\QueryList;

$rang = range(1,2);


$db = new PDO('mysql:host=localhost;dbname=spider;charset=utf8','root','123456');

//内容页面
$sql = "select id,url from test1 where body=''";
$rows = $db->query($sql)->fetchAll(PDO::FETCH_ASSOC);


foreach($rows as $row){
    $html = http_request($url);
    //通过 选择器  删选
    $datalist = QueryList::Query($html, [
    'body' => ['.bd','html']     
    ])->data;
    //内容
    $body = $ret[0]['body'];

    //入库
}



   







